package com.acoreful.bootsample.web;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.acoreful.bootsample.service.MailService;

@RestController
@RequestMapping("sendMail")
public class SendMailController {
	@Autowired
	private MailService mailService;
	@PostMapping
	public Map<String, ?> sendMail(String toEmail) {
		mailService.sendSimpleMail(toEmail, "您好", "测试");
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("code", "00000");
		return map;
	}
}
